#!/usr/bin/env php
<?php

require_once __DIR__ . '/vendor/autoload.php';

ini_set('error_log', \Aurora\Core\Helper::getPath('cli.log'));

$app = new Symfony\Component\Console\Application('Aurora', \Aurora\Core\Kernel::VERSION);

$app->add(new Aurora\Bin\Database\Backup());
$app->add(new Aurora\Bin\Database\Restore());

$app->add(new Aurora\Bin\Settings\Listing());
$app->add(new Aurora\Bin\Settings\Set());

$app->add(new Aurora\Bin\Update());

foreach ([ 'Pages', 'Posts', 'Tags', 'Users', 'Links' ] as $module) {
    foreach ([ 'Create', 'Delete', 'Edit', 'Listing' ] as $action) {
        $app->add(new ("Aurora\\Bin\\$module\\$action")());
    }
}

$app->run();